
window.onload = function (){
   var tabbar = document.getElementById("tabbar");
   var divs = tabbar.querySelectorAll("div");

    for (let i = 0; i < divs.length; i++) {
        let url = "";
       divs[i].onclick=function (){
           switch (i){
               case 0:
                   url = "/OrderingFoodForWebMaven/businessHome.do";
                   break;
               case 1:
                   url="/OrderingFoodForWebMaven/businessOrder.do";
                   break;
               case 2:
                   url="/OrderingFoodForWebMaven/pages/business/setting.jsp";
                   break;
               case 3:
                   url="/OrderingFoodForWebMaven/pages/business/about.jsp";
                   break;
               default:
                   url = "/OrderingFoodForWebMaven/businessHome.do";
                   break;
           }
           location.href=url;
       }

    }
}